package com.ctgu.demo.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ctgu.demo.entity.CakeRotation;
import com.ctgu.demo.service.CakeRotationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin(allowCredentials = "true", allowedHeaders = "*")
@RestController
@RequestMapping("/cake_r")
public class CakeRotationController {

    @Autowired
    CakeRotationService cakeRotationService;

    @RequestMapping("/getCakeRotationAll")
    public List<CakeRotation> getCakeAll(){
        QueryWrapper<CakeRotation> wrapper =new QueryWrapper<CakeRotation>();
        wrapper.select("*");
        List<CakeRotation> list= cakeRotationService.list(wrapper);
        return list;
    }
}
